package com.ksu.manager.service.impl;

import java.util.List;

import com.ksu.manager.dao.IUserDAO;
import com.ksu.manager.model.User;
import com.ksu.manager.service.IUserService;

public class UserServiceImpl implements IUserService {
	
	private IUserDAO userDAO;

	public IUserDAO getUserDAO() {
		return userDAO;
	}

	public void setUserDAO(IUserDAO userDAO) {
		this.userDAO = userDAO;
	}

	public void add(User user) {
		this.userDAO.create(user);

	}

	public void del(User user) {
		this.userDAO.delete(user);

	}

	public void mod(User user) {
		this.userDAO.update(user);

	}

	public List<User> queryList(User user) {
		
		return this.userDAO.queryList(user);
	}

	@Override
	public User queryUserById(User user) {
		
		return this.userDAO.queryUserById(user);
	}

}
